package de.awg.accountanalyzer.logic;

public enum ViewLevel {
	DAY, WEEK, MONTH, QUARTAL, YEAR;

	public ViewLevel getHigherLevel(ViewLevel viewLevel) {
		switch (viewLevel) {
		case DAY:
			return ViewLevel.WEEK;
		case WEEK:
			return ViewLevel.MONTH;
		case MONTH:
			return ViewLevel.QUARTAL;
		case QUARTAL:
			return ViewLevel.YEAR;
		case YEAR:
			return ViewLevel.YEAR;
		default:
			return ViewLevel.YEAR;
		}

	}

	public ViewLevel getDeeperLevel(ViewLevel viewLevel) {
		switch (viewLevel) {
		case DAY:
			return ViewLevel.DAY;
		case WEEK:
			return ViewLevel.DAY;
		case MONTH:
			return ViewLevel.WEEK;
		case QUARTAL:
			return ViewLevel.MONTH;
		case YEAR:
			return ViewLevel.QUARTAL;
		default:
			return ViewLevel.DAY;
		}

	}
}
